<!--{eval $bodyClass ='center-vh overflow-y-auto';}-->
<!--{template lyear:header_simple}-->
<style>
.recharge-amount li {
    width: 150px;
    cursor: pointer;
    margin: 0px 5px 10px;
    padding: 3px;
    color: #4d5259;
    text-align: center;
    border-radius: 5px;
    -webkit-border-radius: 5px;
    border: 3px solid transparent;
    -webkit-box-shadow: 0 0 2px rgba(0, 0, 0, .175);
    box-shadow: 0 0 2px rgba(0, 0, 0, .175);
}
.recharge-amount li.active {
	border-color: #007bff;
    border-color: var(--bs-primary);
}
.recharge-amount li:hover {
	border-color: #0096FF;
}
.recharge-amount li input {
    display: none;
}
.recharge-amount li .col {
	overflow: hidden;
}
</style>
<script type="text/javascript">
	function loginsub(formid,rspaceid){
		if(!$('#login_uid').val()) {
			showmessage('请先选择用户','danger',3000,1);return false;
		}
		var form = jQuery('#'+formid);
		var url = form.attr('action');

		var formData = form.serialize();

		var type = 'json';

		jQuery.post(url+'&returnType='+type,formData,function(json){
			if(json['success']){
				showmessage(json['success']['message'],"success",0,1);
				setTimeout(function() {
					location.href = json['success']['url_forward'];
				}, 1000);
			}else if(json['error']){
				showmessage(json['error'],"danger",3000,1);
				jQuery('#'+rspaceid).html(json['error']);
			}else{
				showmessage(__lang.system_busy,"danger",3000,1);
				jQuery('#'+rspaceid).html(__lang.system_busy);
			}
		},'json')
		.fail(function (jqXHR, textStatus, errorThrown) {
			showmessage(__lang.system_error, 'error', '3000', 1);
			jQuery('#'+rspaceid).html(__lang.system_error);
		});
	}
</script>
<!--{eval $loginhash = 'L'.random(4);}-->
<!--背景层-->
<div id="wrapper_div" style="width: 100%;height:100%;  position: absolute; top: 0px; left: 0px; margin: 0px; padding: 0px; overflow: hidden;z-index:0;  font-size: 0px; background:{eval echo $_G['setting']['loginset']['bcolor']?$_G['setting']['loginset']['bcolor']:'#76838f';};"> 
	<!--{if !$_G['setting']['loginset']['bcolor']}-->
	<img src="{eval echo $_G['setting']['loginset']['img']?$_G['setting']['loginset']['img']:MOD_PATH.'/images/login.jpg';}" name="imgbg" id="imgbg" style="right: 0px; bottom: 0px; top: 0px; left: 0px; z-index:1;margin:0;padding:0;overflow:hidden; position: absolute;width:100%;height:100%" height="100%" width="100%">
	<!--{/if}-->
    <!--{if $_G['setting']['loginset']['url']}-->
    <iframe id="wrapper_frame" name="wrapper_frame" src="$_G['setting']['loginset']['url']" frameborder="0" marginheight="0" marginwidth="0" width="100%" height="100%" allowtransparency="true" style="z-index:2;position:absolute;width:100%;height:100%;background:url(dzz/images/b.gif);"></iframe>
    <!--{/if}-->
</div>
<div class="card card-shadowed p-5 mb-0 mr-2 ml-2" style="max-width: 930px;">
	<div class="card-body text-center">
		<div class="text-center mb-3">
			<img src="<!--{if $_G['setting']['bbclosed']}-->static/image/common/logo.png<!--{else}-->{eval echo $_G['setting']['sitelogo']?'index.php?mod=io&op=thumbnail&size=small&path='.dzzencode('attach::'.$_G['setting']['sitelogo']):'static/image/common/logo.png';}<!--{/if}-->">
		</div>
		<!--{if $_G[setting][loginset][title]}-->
		<h2 class="main-title">$_G[setting][loginset][title]</h2>
		<!--{/if}--> 
		<!--{if $_G[setting][loginset][subtitle]}-->
		<div class="sub-title">$_G[setting][loginset][subtitle]</div>
		<!--{/if}-->
		<!--{if $_G[setting][bbclosed]}-->
		<p class="text-danger">{lang site_closed_please_admin}</p>
		<!--{/if}-->
		<div class="sub-title">请选择下列用户登录</div>
      </div>
	<form method="post" name="login" id="loginform_$loginhash" class="signin-form loginForm" role="form" onsubmit="loginsub('loginform_$loginhash', 'returnmessage_$loginhash');return false;" action="user.php?mod=login&op=login">
		<input type="hidden" name="formhash" value="{FORMHASH}" />
		<input type="hidden" name="referer" value="{$referer}" />
		<input type="hidden" id="login_uid" name="uid" value="" />
		<ul class="list-inline recharge-amount">
			<!--{loop $data $v}-->
			<li class="list-inline-item" data-uid="$v['uid']" title="$v[username]">
				<div class="d-flex align-items-center">
					<div class="col-auto pe-1">
					{eval echo avatar_block($v['uid']);}
					</div>
					<div class="col text-start">
						<div class="text-truncate fs-6">$v[username]</div>
						<div class="text-secondary text-truncate fs-7" title="$v[jobname]">$v[jobname]</div>
					</div>
				</div>
			</li>
			<!--{/loop}-->
		</ul>
		<!--{if $_G[setting][loginset][other]}-->
		<div class="mb-3 float-end">
			<a class="pull-right" href="user.php?mod=login&template=1">{lang other_login}</a>
		</div>
		<!--{/if}-->
		<div class="mb-3 d-grid">
			<button class="btn btn-primary lyearloading disabled" type="submit" name="loginsubmit" id="loginsubmit" value="true">{lang login_empty}</button>
		</div>
		<p class="error-msg text-danger text-center" id="returnmessage_$loginhash"></p>
	</form>
  <p class="text-center text-muted mb-0"><!--{template lyear:copyright}--></p>
</div>
<script type="text/javascript">
$(document).ready(function(){
    $(document).on('click', '.recharge-amount li', function() {
        $(this).addClass('active').siblings().removeClass('active');
		$('#login_uid').val($(this).data('uid'));
		$('#loginsubmit').removeClass('disabled');
        $(this).siblings().find('input').prop('checked', 0);
        $(this).find('input').prop('checked', 1);
    });
});
</script>
<!--{template lyear:footer_simple}-->